




/*
'===============================================================================
'  MP.LayerHelper.MP_OBS.BL.HrHumanOrganizeManagerBase
'===============================================================================
*/

using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using MP.LayerHelper.MP_OBS.BLL;
using MP.LayerHelper.MP_OBS.DAL;
using MP.LayerHelper.MP_OBS.DAL.EntityClasses;
using MP.LayerHelper.MP_OBS.DAL.FactoryClasses;
using MP.LayerHelper.MP_OBS.DAL.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;

namespace MP.LayerHelper.MP_OBS.BLL
{
	public class HrHumanOrganizeManagerBase : ManagerBase
	{
		/// <summary>
		/// Purpose: Class constructor.
		/// </summary>
		
		public HrHumanOrganizeManagerBase()
		{
			// Nothing for now.
		}
		
		public override string TableName()
        {
            return "HrHumanOrganize";
        }
		
		public HrHumanOrganizeEntity Insert(HrHumanOrganizeEntity _HrHumanOrganizeEntity)
		{
			return Insert(_HrHumanOrganizeEntity, "");
		}
		
		public HrHumanOrganizeEntity Insert(HrHumanOrganizeEntity _HrHumanOrganizeEntity, string controlId)
		{
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.SaveEntity(_HrHumanOrganizeEntity, true);
				HrHumanOrganizeFields field = new HrHumanOrganizeFields();
                LogEntity(_HrHumanOrganizeEntity, field, AcInsert, controlId);
			}
			return _HrHumanOrganizeEntity;
		}

		
		public HrHumanOrganizeEntity Insert(Guid Id, Guid BranchId, Guid DepartId, Guid JobId, Guid GroupId, bool IsDeleted, DateTime CreatedDate, string CreatedBy, DateTime UpdatedDate, string UpdatedBy)
		{
			HrHumanOrganizeEntity _HrHumanOrganizeEntity = new HrHumanOrganizeEntity();
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				
				_HrHumanOrganizeEntity.Id = Id;
				_HrHumanOrganizeEntity.BranchId = BranchId;
				_HrHumanOrganizeEntity.DepartId = DepartId;
				_HrHumanOrganizeEntity.JobId = JobId;
				_HrHumanOrganizeEntity.GroupId = GroupId;
				_HrHumanOrganizeEntity.IsDeleted = IsDeleted;
				_HrHumanOrganizeEntity.CreatedDate = CreatedDate;
				_HrHumanOrganizeEntity.CreatedBy = CreatedBy;
				_HrHumanOrganizeEntity.UpdatedDate = UpdatedDate;
				_HrHumanOrganizeEntity.UpdatedBy = UpdatedBy;
				HrHumanOrganizeFields field = new HrHumanOrganizeFields();
                LogEntity(_HrHumanOrganizeEntity, field, AcInsert);
				adapter.SaveEntity(_HrHumanOrganizeEntity, true);
			}
			return _HrHumanOrganizeEntity;
		}

		public HrHumanOrganizeEntity Insert(Guid BranchId, Guid DepartId, Guid JobId, Guid GroupId, bool IsDeleted, DateTime CreatedDate, string CreatedBy, DateTime UpdatedDate, string UpdatedBy)
		{
			HrHumanOrganizeEntity _HrHumanOrganizeEntity = new HrHumanOrganizeEntity();
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				
				_HrHumanOrganizeEntity.BranchId = BranchId;
				_HrHumanOrganizeEntity.DepartId = DepartId;
				_HrHumanOrganizeEntity.JobId = JobId;
				_HrHumanOrganizeEntity.GroupId = GroupId;
				_HrHumanOrganizeEntity.IsDeleted = IsDeleted;
				_HrHumanOrganizeEntity.CreatedDate = CreatedDate;
				_HrHumanOrganizeEntity.CreatedBy = CreatedBy;
				_HrHumanOrganizeEntity.UpdatedDate = UpdatedDate;
				_HrHumanOrganizeEntity.UpdatedBy = UpdatedBy;
				adapter.SaveEntity(_HrHumanOrganizeEntity, true);
				HrHumanOrganizeFields field = new HrHumanOrganizeFields();
                LogEntity(_HrHumanOrganizeEntity, field, AcInsert);
			}
			return _HrHumanOrganizeEntity;
		}
		
		public bool Update(HrHumanOrganizeEntity _HrHumanOrganizeEntity)
        {
            return Update(_HrHumanOrganizeEntity, "");
        }

		public bool Update(HrHumanOrganizeEntity _HrHumanOrganizeEntity, string controlId)
		{
			bool toReturn = false;
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				RelationPredicateBucket filter = new RelationPredicateBucket();
				IPredicateExpression _PredicateExpression = new PredicateExpression();
				_PredicateExpression.Add(HrHumanOrganizeFields.Id == _HrHumanOrganizeEntity.Id);
					
				filter.PredicateExpression.Add(_PredicateExpression);

				adapter.UpdateEntitiesDirectly(_HrHumanOrganizeEntity, filter);
				toReturn = true;
				
				HrHumanOrganizeFields field = new HrHumanOrganizeFields();
                LogEntity(_HrHumanOrganizeEntity, field, AcUpdate, controlId);
			}
			return toReturn;
		}
		
		public bool Update(HrHumanOrganizeEntity _HrHumanOrganizeEntity, RelationPredicateBucket filter)
		{
			bool toReturn = false;
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.UpdateEntitiesDirectly(_HrHumanOrganizeEntity, filter);
				toReturn = true;
				
				HrHumanOrganizeFields field = new HrHumanOrganizeFields();
                LogEntity(_HrHumanOrganizeEntity, field, AcUpdate);
			}
			return toReturn;
		}

		public bool Update(Guid Id, Guid BranchId, Guid DepartId, Guid JobId, Guid GroupId, bool IsDeleted, DateTime CreatedDate, string CreatedBy, DateTime UpdatedDate, string UpdatedBy)
		{
			bool toReturn = false;
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				HrHumanOrganizeEntity _HrHumanOrganizeEntity = new HrHumanOrganizeEntity(Id);
				if (adapter.FetchEntity(_HrHumanOrganizeEntity))
				{
				
					_HrHumanOrganizeEntity.BranchId = BranchId;
					_HrHumanOrganizeEntity.DepartId = DepartId;
					_HrHumanOrganizeEntity.JobId = JobId;
					_HrHumanOrganizeEntity.GroupId = GroupId;
					_HrHumanOrganizeEntity.IsDeleted = IsDeleted;
					_HrHumanOrganizeEntity.CreatedDate = CreatedDate;
					_HrHumanOrganizeEntity.CreatedBy = CreatedBy;
					_HrHumanOrganizeEntity.UpdatedDate = UpdatedDate;
					_HrHumanOrganizeEntity.UpdatedBy = UpdatedBy;
					adapter.SaveEntity(_HrHumanOrganizeEntity, true);
					toReturn = true;
					
					HrHumanOrganizeFields field = new HrHumanOrganizeFields();
					LogEntity(_HrHumanOrganizeEntity, field, AcUpdate);
				}
			}
			return toReturn;
		}

		public bool Delete(Guid Id)
		{
			bool toReturn = false;
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				HrHumanOrganizeEntity _HrHumanOrganizeEntity = new HrHumanOrganizeEntity(Id);
				if (adapter.FetchEntity(_HrHumanOrganizeEntity))
				{
					adapter.DeleteEntity(_HrHumanOrganizeEntity);
					toReturn = true;
				}
			}
			return toReturn;
		}
		
		public void DeleteAll() 
		{
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.DeleteEntitiesDirectly("HrHumanOrganizeEntity", null);
			}
		}
		
		
		public int DeleteById(Guid Id)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.Id == Id);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrHumanOrganizeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByBranchId(Guid BranchId)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.BranchId == BranchId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrHumanOrganizeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByDepartId(Guid DepartId)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.DepartId == DepartId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrHumanOrganizeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByJobId(Guid JobId)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.JobId == JobId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrHumanOrganizeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByGroupId(Guid GroupId)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.GroupId == GroupId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrHumanOrganizeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByIsDeleted(bool IsDeleted)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.IsDeleted == IsDeleted);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrHumanOrganizeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByCreatedDate(DateTime CreatedDate)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.CreatedDate == CreatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrHumanOrganizeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByCreatedBy(string CreatedBy)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.CreatedBy == CreatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrHumanOrganizeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByUpdatedDate(DateTime UpdatedDate)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.UpdatedDate == UpdatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrHumanOrganizeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByUpdatedBy(string UpdatedBy)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.UpdatedBy == UpdatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrHumanOrganizeEntity", filter);
			}
			return toReturn;
		}
		

		
		public HrHumanOrganizeEntity SelectOne(Guid Id)
		{
			HrHumanOrganizeEntity toReturn = null;
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				HrHumanOrganizeEntity _HrHumanOrganizeEntity = new HrHumanOrganizeEntity(Id);
				if (adapter.FetchEntity(_HrHumanOrganizeEntity))
				{
					toReturn = _HrHumanOrganizeEntity;
				}
			}
			return toReturn;
		}

		// Return DataTable
		public DataTable SelectAllRDT()
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrHumanOrganizeCollection = new EntityCollection(new HrHumanOrganizeEntityFactory());
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrHumanOrganizeCollection.EntityFactoryToUse.CreateFields(), toReturn, null, true);
			}
			return toReturn;
		}
		
		// Return EntityCollection<HrHumanOrganizeEntity>
		public EntityCollection<HrHumanOrganizeEntity> SelectAllLST()
		{
			EntityCollection<HrHumanOrganizeEntity> _HrHumanOrganizeCollection = new EntityCollection<HrHumanOrganizeEntity>();
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrHumanOrganizeCollection, null, 0, null);
			}
			return _HrHumanOrganizeCollection;
		}
		
		// Return EntityCollection<HrHumanOrganizeEntity>
		public EntityCollection<HrHumanOrganizeEntity> SelectAllLST_Paged(int PageNumber, int PageSize)
		{
			EntityCollection<HrHumanOrganizeEntity> _HrHumanOrganizeCollection = new EntityCollection<HrHumanOrganizeEntity>();
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrHumanOrganizeCollection, null, 0, null, null, PageNumber, PageSize);
			}
			return _HrHumanOrganizeCollection;
		}


		
		// Return EntityCollection<HrHumanOrganizeEntity>
		public EntityCollection<HrHumanOrganizeEntity> SelectByIdLST(Guid Id)
		{
			EntityCollection<HrHumanOrganizeEntity> _HrHumanOrganizeCollection = new EntityCollection<HrHumanOrganizeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.Id == Id);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrHumanOrganizeCollection, filter, 0, null);
			}
			return _HrHumanOrganizeCollection;
		}
		
		// Return EntityCollection<HrHumanOrganizeEntity>
		public EntityCollection<HrHumanOrganizeEntity> SelectByIdLST_Paged(Guid Id, int PageNumber, int PageSize)
		{
			EntityCollection<HrHumanOrganizeEntity> _HrHumanOrganizeCollection = new EntityCollection<HrHumanOrganizeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.Id == Id);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrHumanOrganizeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrHumanOrganizeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByIdRDT(Guid Id)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrHumanOrganizeCollection = new EntityCollection(new HrHumanOrganizeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.Id == Id);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrHumanOrganizeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByIdRDT_Paged(Guid Id, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrHumanOrganizeCollection = new EntityCollection(new HrHumanOrganizeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.Id == Id);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrHumanOrganizeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrHumanOrganizeEntity>
		public EntityCollection<HrHumanOrganizeEntity> SelectByBranchIdLST(Guid BranchId)
		{
			EntityCollection<HrHumanOrganizeEntity> _HrHumanOrganizeCollection = new EntityCollection<HrHumanOrganizeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.BranchId == BranchId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrHumanOrganizeCollection, filter, 0, null);
			}
			return _HrHumanOrganizeCollection;
		}
		
		// Return EntityCollection<HrHumanOrganizeEntity>
		public EntityCollection<HrHumanOrganizeEntity> SelectByBranchIdLST_Paged(Guid BranchId, int PageNumber, int PageSize)
		{
			EntityCollection<HrHumanOrganizeEntity> _HrHumanOrganizeCollection = new EntityCollection<HrHumanOrganizeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.BranchId == BranchId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrHumanOrganizeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrHumanOrganizeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByBranchIdRDT(Guid BranchId)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrHumanOrganizeCollection = new EntityCollection(new HrHumanOrganizeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.BranchId == BranchId);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrHumanOrganizeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByBranchIdRDT_Paged(Guid BranchId, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrHumanOrganizeCollection = new EntityCollection(new HrHumanOrganizeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.BranchId == BranchId);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrHumanOrganizeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrHumanOrganizeEntity>
		public EntityCollection<HrHumanOrganizeEntity> SelectByDepartIdLST(Guid DepartId)
		{
			EntityCollection<HrHumanOrganizeEntity> _HrHumanOrganizeCollection = new EntityCollection<HrHumanOrganizeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.DepartId == DepartId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrHumanOrganizeCollection, filter, 0, null);
			}
			return _HrHumanOrganizeCollection;
		}
		
		// Return EntityCollection<HrHumanOrganizeEntity>
		public EntityCollection<HrHumanOrganizeEntity> SelectByDepartIdLST_Paged(Guid DepartId, int PageNumber, int PageSize)
		{
			EntityCollection<HrHumanOrganizeEntity> _HrHumanOrganizeCollection = new EntityCollection<HrHumanOrganizeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.DepartId == DepartId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrHumanOrganizeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrHumanOrganizeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByDepartIdRDT(Guid DepartId)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrHumanOrganizeCollection = new EntityCollection(new HrHumanOrganizeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.DepartId == DepartId);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrHumanOrganizeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByDepartIdRDT_Paged(Guid DepartId, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrHumanOrganizeCollection = new EntityCollection(new HrHumanOrganizeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.DepartId == DepartId);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrHumanOrganizeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrHumanOrganizeEntity>
		public EntityCollection<HrHumanOrganizeEntity> SelectByJobIdLST(Guid JobId)
		{
			EntityCollection<HrHumanOrganizeEntity> _HrHumanOrganizeCollection = new EntityCollection<HrHumanOrganizeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.JobId == JobId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrHumanOrganizeCollection, filter, 0, null);
			}
			return _HrHumanOrganizeCollection;
		}
		
		// Return EntityCollection<HrHumanOrganizeEntity>
		public EntityCollection<HrHumanOrganizeEntity> SelectByJobIdLST_Paged(Guid JobId, int PageNumber, int PageSize)
		{
			EntityCollection<HrHumanOrganizeEntity> _HrHumanOrganizeCollection = new EntityCollection<HrHumanOrganizeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.JobId == JobId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrHumanOrganizeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrHumanOrganizeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByJobIdRDT(Guid JobId)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrHumanOrganizeCollection = new EntityCollection(new HrHumanOrganizeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.JobId == JobId);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrHumanOrganizeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByJobIdRDT_Paged(Guid JobId, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrHumanOrganizeCollection = new EntityCollection(new HrHumanOrganizeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.JobId == JobId);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrHumanOrganizeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrHumanOrganizeEntity>
		public EntityCollection<HrHumanOrganizeEntity> SelectByGroupIdLST(Guid GroupId)
		{
			EntityCollection<HrHumanOrganizeEntity> _HrHumanOrganizeCollection = new EntityCollection<HrHumanOrganizeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.GroupId == GroupId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrHumanOrganizeCollection, filter, 0, null);
			}
			return _HrHumanOrganizeCollection;
		}
		
		// Return EntityCollection<HrHumanOrganizeEntity>
		public EntityCollection<HrHumanOrganizeEntity> SelectByGroupIdLST_Paged(Guid GroupId, int PageNumber, int PageSize)
		{
			EntityCollection<HrHumanOrganizeEntity> _HrHumanOrganizeCollection = new EntityCollection<HrHumanOrganizeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.GroupId == GroupId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrHumanOrganizeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrHumanOrganizeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByGroupIdRDT(Guid GroupId)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrHumanOrganizeCollection = new EntityCollection(new HrHumanOrganizeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.GroupId == GroupId);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrHumanOrganizeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByGroupIdRDT_Paged(Guid GroupId, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrHumanOrganizeCollection = new EntityCollection(new HrHumanOrganizeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.GroupId == GroupId);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrHumanOrganizeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrHumanOrganizeEntity>
		public EntityCollection<HrHumanOrganizeEntity> SelectByIsDeletedLST(bool IsDeleted)
		{
			EntityCollection<HrHumanOrganizeEntity> _HrHumanOrganizeCollection = new EntityCollection<HrHumanOrganizeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.IsDeleted == IsDeleted);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrHumanOrganizeCollection, filter, 0, null);
			}
			return _HrHumanOrganizeCollection;
		}
		
		// Return EntityCollection<HrHumanOrganizeEntity>
		public EntityCollection<HrHumanOrganizeEntity> SelectByIsDeletedLST_Paged(bool IsDeleted, int PageNumber, int PageSize)
		{
			EntityCollection<HrHumanOrganizeEntity> _HrHumanOrganizeCollection = new EntityCollection<HrHumanOrganizeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.IsDeleted == IsDeleted);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrHumanOrganizeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrHumanOrganizeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByIsDeletedRDT(bool IsDeleted)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrHumanOrganizeCollection = new EntityCollection(new HrHumanOrganizeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.IsDeleted == IsDeleted);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrHumanOrganizeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByIsDeletedRDT_Paged(bool IsDeleted, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrHumanOrganizeCollection = new EntityCollection(new HrHumanOrganizeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.IsDeleted == IsDeleted);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrHumanOrganizeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrHumanOrganizeEntity>
		public EntityCollection<HrHumanOrganizeEntity> SelectByCreatedDateLST(DateTime CreatedDate)
		{
			EntityCollection<HrHumanOrganizeEntity> _HrHumanOrganizeCollection = new EntityCollection<HrHumanOrganizeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.CreatedDate == CreatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrHumanOrganizeCollection, filter, 0, null);
			}
			return _HrHumanOrganizeCollection;
		}
		
		// Return EntityCollection<HrHumanOrganizeEntity>
		public EntityCollection<HrHumanOrganizeEntity> SelectByCreatedDateLST_Paged(DateTime CreatedDate, int PageNumber, int PageSize)
		{
			EntityCollection<HrHumanOrganizeEntity> _HrHumanOrganizeCollection = new EntityCollection<HrHumanOrganizeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.CreatedDate == CreatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrHumanOrganizeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrHumanOrganizeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByCreatedDateRDT(DateTime CreatedDate)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrHumanOrganizeCollection = new EntityCollection(new HrHumanOrganizeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.CreatedDate == CreatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrHumanOrganizeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByCreatedDateRDT_Paged(DateTime CreatedDate, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrHumanOrganizeCollection = new EntityCollection(new HrHumanOrganizeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.CreatedDate == CreatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrHumanOrganizeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrHumanOrganizeEntity>
		public EntityCollection<HrHumanOrganizeEntity> SelectByCreatedByLST(string CreatedBy)
		{
			EntityCollection<HrHumanOrganizeEntity> _HrHumanOrganizeCollection = new EntityCollection<HrHumanOrganizeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.CreatedBy == CreatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrHumanOrganizeCollection, filter, 0, null);
			}
			return _HrHumanOrganizeCollection;
		}
		
		// Return EntityCollection<HrHumanOrganizeEntity>
		public EntityCollection<HrHumanOrganizeEntity> SelectByCreatedByLST_Paged(string CreatedBy, int PageNumber, int PageSize)
		{
			EntityCollection<HrHumanOrganizeEntity> _HrHumanOrganizeCollection = new EntityCollection<HrHumanOrganizeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.CreatedBy == CreatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrHumanOrganizeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrHumanOrganizeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByCreatedByRDT(string CreatedBy)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrHumanOrganizeCollection = new EntityCollection(new HrHumanOrganizeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.CreatedBy == CreatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrHumanOrganizeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByCreatedByRDT_Paged(string CreatedBy, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrHumanOrganizeCollection = new EntityCollection(new HrHumanOrganizeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.CreatedBy == CreatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrHumanOrganizeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrHumanOrganizeEntity>
		public EntityCollection<HrHumanOrganizeEntity> SelectByUpdatedDateLST(DateTime UpdatedDate)
		{
			EntityCollection<HrHumanOrganizeEntity> _HrHumanOrganizeCollection = new EntityCollection<HrHumanOrganizeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.UpdatedDate == UpdatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrHumanOrganizeCollection, filter, 0, null);
			}
			return _HrHumanOrganizeCollection;
		}
		
		// Return EntityCollection<HrHumanOrganizeEntity>
		public EntityCollection<HrHumanOrganizeEntity> SelectByUpdatedDateLST_Paged(DateTime UpdatedDate, int PageNumber, int PageSize)
		{
			EntityCollection<HrHumanOrganizeEntity> _HrHumanOrganizeCollection = new EntityCollection<HrHumanOrganizeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.UpdatedDate == UpdatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrHumanOrganizeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrHumanOrganizeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByUpdatedDateRDT(DateTime UpdatedDate)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrHumanOrganizeCollection = new EntityCollection(new HrHumanOrganizeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.UpdatedDate == UpdatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrHumanOrganizeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByUpdatedDateRDT_Paged(DateTime UpdatedDate, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrHumanOrganizeCollection = new EntityCollection(new HrHumanOrganizeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.UpdatedDate == UpdatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrHumanOrganizeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrHumanOrganizeEntity>
		public EntityCollection<HrHumanOrganizeEntity> SelectByUpdatedByLST(string UpdatedBy)
		{
			EntityCollection<HrHumanOrganizeEntity> _HrHumanOrganizeCollection = new EntityCollection<HrHumanOrganizeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.UpdatedBy == UpdatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrHumanOrganizeCollection, filter, 0, null);
			}
			return _HrHumanOrganizeCollection;
		}
		
		// Return EntityCollection<HrHumanOrganizeEntity>
		public EntityCollection<HrHumanOrganizeEntity> SelectByUpdatedByLST_Paged(string UpdatedBy, int PageNumber, int PageSize)
		{
			EntityCollection<HrHumanOrganizeEntity> _HrHumanOrganizeCollection = new EntityCollection<HrHumanOrganizeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.UpdatedBy == UpdatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrHumanOrganizeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrHumanOrganizeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByUpdatedByRDT(string UpdatedBy)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrHumanOrganizeCollection = new EntityCollection(new HrHumanOrganizeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.UpdatedBy == UpdatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrHumanOrganizeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByUpdatedByRDT_Paged(string UpdatedBy, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrHumanOrganizeCollection = new EntityCollection(new HrHumanOrganizeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrHumanOrganizeFields.UpdatedBy == UpdatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrHumanOrganizeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		

	}
}
